<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="过户列表" bodyClass="gray-bg animated fadeInRight" isAnimation="false" libs=["table","zTree","layout-latest"]/>
<div class="container-div">
 <div class="row">
  <div class="col-sm-12 search-collapse">
    <@form.form id="transfer-form" class="form-inline">
     <div class="select-list">
      <ul>
           <li>
              <label> <@ctx.i18n text = "订单号"/>：
               <input type="text" name="saleCode"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "销售员"/>：
               <input type="text" name="saleUserid"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "销售订单编号"/>：
               <input type="text" name="saleOrderNumber"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车辆识别号"/>：
               <input type="text" name="outCarVin"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车型"/>：
               <input type="text" name="outCarVehicle"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "出纳审核"/>： </label>
                <select name="orderCashierReview" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_bpm_crm_passorclose')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
                 <label> <@ctx.i18n text = "财务经理审核"/>： </label>
                <select name="orderFinanceManagerReview" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_bpm_crm_passorclose')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
              <label> <@ctx.i18n text = "客户ssn"/>：
               <input type="text" name="orderCustomerSsn"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "客户I-20附件"/>：
               <input type="text" name="orderCustomerIFilepath"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "注册人姓名"/>：
               <input type="text" name="orderRegistrantName"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "注册人地址"/>：
               <input type="text" name="orderRegistrantAddress"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "注册人手机"/>：
               <input type="text" name="orderRegistrantPhone"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "是否需要邮件"/>： </label>
                <select name="orderIsNeedMail" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_isOrNo')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
                 <label> <@ctx.i18n text = "收件人是否同注册人"/>： </label>
                <select name="orderRecipientisregistrant" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_isOrNo')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
              <label> <@ctx.i18n text = "收件人姓名"/>：
               <input type="text" name="orderRecipientName"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "收件人手机"/>：
               <input type="text" name="orderRecipientPhone"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "税"/>：
               <input type="text" name="taxAmount"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "手续费"/>：
               <input type="text" name="taxServiceCharge"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "运费"/>：
               <input type="text" name="taxFreight"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "航运信息"/>：
               <input type="text" name="taxShippingInfo"/> </label>
            </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "过户日期"/>： </label>
            <input type="text" class="time-input" name="TaxTransferDate"/>
        </li>
        <li>
          <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;&nbsp;<@ctx.i18n text = "查询"/></a>
          <a class="btn btn-warning btn-rounded btn-sm" onclick="opt.form.reset()"><i class="fa fa-refresh"></i>&nbsp;<@ctx.i18n text = "重置"/></a>
       </li>
      </ul>
   </div>
  </@form.form>
 </div>
  <@table id="bootstrap-table">
    <@shiro.hasPermission name="bpm:transfer:add">
                    <a class="btn btn-success" onclick="opt.operate.add()"><i class="fa fa-plus"></i>&nbsp;<@ctx.i18n text = "新增"/></a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="bpm:transfer:edit">
        <a class="btn btn-primary single disabled" onclick="opt.operate.edit()"><i class="fa fa-pencil-square-o"></i>&nbsp;<@ctx.i18n text = "修改"/></a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="bpm:transfer:del">
        <a class="btn btn-danger multiple disabled" onclick="opt.operate.delAll()">
            <i class="fa fa-remove"></i> <@ctx.i18n text = "删除"/>
        </a>
    </@shiro.hasPermission>
   </@table>
  <div>
</div>
<@footer>
<script>
    var editFlag = "${permission.hasPermi("bpm:transfer:edit")}";
    var listFlag = "${permission.hasPermi("bpm:transfer:add")}";
    var delFlag = "${permission.hasPermi("bpm:transfer:del")}";
    var visible = ${permission.isPermitteds("bpm:transfer:edit,bpm:transfer:del,bpm:transfer:add")?string('true', 'false')};
   var orderCashierReviewDatas = ${dict.getDictListJson('sys_bpm_crm_passorclose')};
   var orderFinanceManagerReviewDatas = ${dict.getDictListJson('sys_bpm_crm_passorclose')};
   var orderIsNeedMailDatas = ${dict.getDictListJson('sys_crm_isOrNo')};
   var orderRecipientisregistrantDatas = ${dict.getDictListJson('sys_crm_isOrNo')};
    var prefix = baseURL + "bpm/transfer";

    $(function() {
        var options = {
            url: prefix + "/list",
            addUrl: prefix + "/add",
            editUrl: prefix + "/edit/{id}",
            delUrl: prefix + "/del",
            modalName: "过户",
            uniqueId:    'id'/* 唯一ID */                                                                               ,
            escape: true,            /* 分页设置 */
            showPageGo: true,       /* 分页设置 */
            pageSize: 10,            /* 分页设置 */
            pageList: [10, 30, 50], /* 分页设置 */
            columns: [
                {title: $.i18n.prop("序号"), width: 5, align: "center", formatter: function (value, row, index) {
                            return $.table.serialNumber(index);
                }}
                ,{field : 'id',title : '<@ctx.i18n text = "主键"/>',visible: false}
               ,{field : 'saleCode',title : '<@ctx.i18n text = "订单号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                     ,{field : 'saleUserid',title : '<@ctx.i18n text = "销售员"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'saleOrderNumber',title : '<@ctx.i18n text = "销售订单编号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'outCarVin',title : '<@ctx.i18n text = "车辆识别号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'outCarVehicle',title : '<@ctx.i18n text = "车型"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderSpecialRemark',title : '<@ctx.i18n text = "特殊备注"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'orderCashierReview',title : '<@ctx.i18n text = "出纳审核"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(orderCashierReviewDatas, value); }}
               ,{field : 'orderFinanceManagerReview',title : '<@ctx.i18n text = "财务经理审核"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(orderFinanceManagerReviewDatas, value); }}
              ,{field : 'orderCustomerSsn',title : '<@ctx.i18n text = "客户ssn"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderCustomerIFilepath',title : '<@ctx.i18n text = "客户I-20附件"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderRegistrantName',title : '<@ctx.i18n text = "注册人姓名"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderRegistrantAddress',title : '<@ctx.i18n text = "注册人地址"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderRegistrantPhone',title : '<@ctx.i18n text = "注册人手机"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'orderIsNeedMail',title : '<@ctx.i18n text = "是否需要邮件"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(orderIsNeedMailDatas, value); }}
               ,{field : 'orderRecipientisregistrant',title : '<@ctx.i18n text = "收件人是否同注册人"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(orderRecipientisregistrantDatas, value); }}
              ,{field : 'orderRecipientName',title : '<@ctx.i18n text = "收件人姓名"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'orderRecipientPhone',title : '<@ctx.i18n text = "收件人手机"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'taxAmount',title : '<@ctx.i18n text = "税"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'taxServiceCharge',title : '<@ctx.i18n text = "手续费"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'taxFreight',title : '<@ctx.i18n text = "运费"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'taxShippingInfo',title : '<@ctx.i18n text = "航运信息"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'taxTransferDate',title : '<@ctx.i18n text = "过户日期"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{title:"<@ctx.i18n text = "操作"/>",align: 'center',visible:visible,formatter: function(value, row, index) {
                        var actions = [];
                          actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="opt.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="opt.operate.del(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="transHref(\'' + row.id + '\')"><i class="fa fa-remove"></i>查看</a>');
                         return actions.join('');
                    }
                }

                ]
            };
            $.table.init(options);
        });
    function transHref(id){
        opt.modal.open("查看",prefix+"/view2/"+id);
    }
</script>
</@footer>
</@pageTheme>